/*
 * 文件名：MappingJackson2HttpMessageConverterEx.java	 
 * 时     间：下午2:20:58
 * 作     者：liyf       
 * 版     权：2014-2022  智慧园区, 公司保留所有权利.
 * 联     系：www.szyungu.com
 */
package com.luckeys.spring.mvc;

import java.io.IOException;
import java.lang.reflect.Type;

import org.springframework.http.HttpInputMessage;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.JavaType;

/** 
 * @ClassName: MappingJackson2HttpMessageConverterEx 
 * @描述: (这里用一句话描述这个类的作用) 
 * @author lify 处理json转换错误
 * @date 2014年8月8日 下午2:20:58 
 */
public class MappingJackson2HttpMessageConverterEx extends
		MappingJackson2HttpMessageConverter
{
	
	@Override
	protected Object readInternal(Class<? extends Object> clazz,
			HttpInputMessage inputMessage) throws IOException,
			HttpMessageNotReadableException
	{
		
		return super.readInternal(clazz, inputMessage);
	}

	@Override
	protected JavaType getJavaType(Type type, Class<?> contextClass)
	{
		this.getObjectMapper().configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
		return super.getJavaType(type, contextClass);
	}
	
	
	
}
